package com.suxin.ratelimit;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable;

/**
 * @author Tang
 * @classname Rate
 * @description [  ]
 * @date 2021/7/14 23:17
 */
@Data
@Entity
@AllArgsConstructor
@NoArgsConstructor
public class Rate implements Serializable {

    @Id
    private Integer id;

    /**
     * key
     */
    private String key;
    /**
     * 刷新时间间隔
     */
    private Long refreshInterval;

    /**
     * 边界
     */
    private Long limit;
    /**
     * 过期时间
     */
    private Long expireTime;
}